<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.6.1" />
	<meta name="robots" content="noindex" />

	<title>File controllers/webservice/usuarios.php</title>

	<script type="text/javascript" src="resources/combined.js?144019575"></script>
	<script type="text/javascript" src="elementlist.js?2260620923"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?1532301413" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li class="active"><a href="package-CodeIgniter.html">CodeIgniter<span></span></a>
						<ul>
				<li class="active"><a href="package-CodeIgniter.Libraries.html">Libraries</a>
						</li>
							</ul></li>
				<li><a href="package-None.html">None</a>
						</li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-Acciones.html">Acciones</a></li>
				<li><a href="class-Datatables.html">Datatables</a></li>
				<li><a href="class-REST_Controller.html">REST_Controller</a></li>
				<li class="active"><a href="class-Usuarios.html">Usuarios</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-CodeIgniter.Libraries.html" title="Summary of CodeIgniter\Libraries"><span>Package</span></a>
			</li>
			<li>
				<a href="class-Usuarios.html" title="Summary of Usuarios"><span>Class</span></a>
			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<pre><code><a href="#1" id="1" class="l"> 1: </a><span class="xlang">&lt;?php</span>
<a href="#2" id="2" class="l"> 2: </a>
<a href="#3" id="3" class="l"> 3: </a><span class="php-keyword1">require</span> APPPATH . <span class="php-quote">'/libraries/REST_Controller.php'</span>;
<a href="#4" id="4" class="l"> 4: </a>
<a href="#5" id="5" class="l"> 5: </a><span class="php-keyword1">class</span> Usuarios <span class="php-keyword1">extends</span> REST_Controller {
<a href="#6" id="6" class="l"> 6: </a>
<a href="#7" id="7" class="l"> 7: </a>    <span class="php-keyword1">function</span> usuario_get() {
<a href="#8" id="8" class="l"> 8: </a>        <span class="php-var">$this</span>-&gt;load-&gt;model(<span class="php-quote">'webservice/musuarios'</span>);
<a href="#9" id="9" class="l"> 9: </a>        <span class="php-var">$login</span> = <span class="php-var">$this</span>-&gt;get(<span class="php-quote">'login'</span>);
<a href="#10" id="10" class="l">10: </a>        <span class="php-var">$password</span> = <span class="php-var">$this</span>-&gt;get(<span class="php-quote">'password'</span>);
<a href="#11" id="11" class="l">11: </a>        <span class="php-var">$acciones</span> = <span class="php-var">$this</span>-&gt;musuarios-&gt;canLogin(<span class="php-var">$login</span>, <span class="php-var">$password</span>);
<a href="#12" id="12" class="l">12: </a>        <span class="php-keyword1">if</span> (<span class="php-var">$acciones</span>) {
<a href="#13" id="13" class="l">13: </a>            <span class="php-var">$this</span>-&gt;response(<span class="php-var">$acciones</span>, <span class="php-num">200</span>);
<a href="#14" id="14" class="l">14: </a>        } <span class="php-keyword1">else</span> {
<a href="#15" id="15" class="l">15: </a>            <span class="php-var">$this</span>-&gt;response(<span class="php-keyword1">false</span>, <span class="php-num">404</span>);
<a href="#16" id="16" class="l">16: </a>        }
<a href="#17" id="17" class="l">17: </a>    }
<a href="#18" id="18" class="l">18: </a>
<a href="#19" id="19" class="l">19: </a><span class="php-comment">//    function accionCliente_get() {</span>
<a href="#20" id="20" class="l">20: </a><span class="php-comment">//        $this-&gt;load-&gt;model('webservice/macciones');</span>
<a href="#21" id="21" class="l">21: </a><span class="php-comment">//        $idCliente = $this-&gt;get('id');</span>
<a href="#22" id="22" class="l">22: </a><span class="php-comment">//        $acciones = $this-&gt;macciones-&gt;obtenerAccionesCliente($idCliente);</span>
<a href="#23" id="23" class="l">23: </a><span class="php-comment">//        if ($acciones) {</span>
<a href="#24" id="24" class="l">24: </a><span class="php-comment">//            $this-&gt;response($acciones, 200);</span>
<a href="#25" id="25" class="l">25: </a><span class="php-comment">//        } else {</span>
<a href="#26" id="26" class="l">26: </a><span class="php-comment">//            $this-&gt;response(NULL, 404);</span>
<a href="#27" id="27" class="l">27: </a><span class="php-comment">//        }</span>
<a href="#28" id="28" class="l">28: </a><span class="php-comment">//    }</span>
<a href="#29" id="29" class="l">29: </a>
<a href="#30" id="30" class="l">30: </a>}</code></pre>

	<div id="footer">
		 API documentation generated by <a href="http://apigen.org">ApiGen 2.6.1</a>
	</div>
</div>
</div>
</body>
</html>
